﻿<%@ Page Language="C#" MasterPageFile="~/Home.Master" AutoEventWireup="true" CodeBehind="Place.aspx.cs"
    Inherits="SLIITPro.Place" Title="Business Page" %>

<%@ Register Src="~/Controls/Comment.ascx" TagName="comment" TagPrefix="uc2" %>
<%@ Register Src="~/Controls/Widget.ascx" TagName="widget" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
    <asp:PlaceHolder ID="ImageGallery" runat="server"></asp:PlaceHolder>
    <table style="width: 100%" class="gridtable">
        <tr>
            <td style="width: 35%;" valign="top">
                <table style="width: 100%" class="gridtable">
                    <tr>
                        <td>
                            Business Name
                        </td>
                        <td>
                            <asp:Label ID="lblBusinessName" runat="server" Style="font-weight: 800"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            City
                        </td>
                        <td>
                            <asp:Label ID="lblCity" runat="server" Style="font-weight: 700"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Street
                        </td>
                        <td>
                            <asp:Label ID="lblStreet" runat="server" Style="font-weight: 700"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Telephone
                        </td>
                        <td>
                            <asp:Label ID="lblPhone" runat="server" Style="font-weight: 700"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Email
                        </td>
                        <td>
                            <asp:Label ID="lblEmail" runat="server" Style="font-weight: 700"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnPublish" runat="server" OnClick="btnPublish_Click" 
                                Text="Publish" CssClass="cssbutton" Height="31px" Width="97px" />

                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <uc3:widget ID="WidgetComment" runat="server"></uc3:widget>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Button ID="btnGetroot" runat="server" Text="Route" OnClick="btnGetroot_Click"
                                CssClass="cssbutton" Width="200px" />
                        </td>
                    </tr>
                    </table>
            </td>
            <td style="width: 100%; padding-top:20px;" align="right" valign="top">
                <div class="map">
                    <asp:UpdatePanel ID="upGoogleMap" runat="server" UpdateMode="Conditional">
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnGetroot" />
                        </Triggers>
                        <ContentTemplate>
                            <artem:GoogleMap ID="GoogleMapBusiness" runat="server" Width="100%" Height="400px"
                                Zoom="10" StreetViewMode="Overlay">
                            </artem:GoogleMap>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </td>
        </tr>
    </table>
    <br />
    <asp:UpdatePanel ID="upcomment" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <table class="gridtable" width="50%" align="left">
                <tr>
                    <td>
                        <asp:PlaceHolder ID="cmtPlace" runat="server"></asp:PlaceHolder>
                        <asp:Label ID="lblAwaiting" runat="server" ForeColor="Green"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table id="tblComment" runat="server" class="gridtable">
                            <tr>
                                <td>
                                    Email
                                </td>
                                <td>
                                    <asp:TextBox ID="txtEmail" runat="server" Width="300px" CssClass="droplist"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="reqEmail" runat="server" ControlToValidate="txtEmail"
                                        ErrorMessage="User Name Required" ValidationGroup="comment" Display="Dynamic"><img src="Images/InputError.png" alt="Commenter's Email Required" /></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="regBEmail" runat="server" ControlToValidate="txtEmail"
                                        Display="Dynamic" ErrorMessage="&lt;br /&gt;Please enter a Email address in the format:&lt;br /&gt;name@yourdomian.com"
                                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="comment"><img src="Images/InputError.png" alt="Please enter a Email address in correct format" /></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top">
                                    Comment
                                </td>
                                <td>
                                    <asp:TextBox ID="txtComment" runat="server" Height="150px" Width="300px" CssClass="droplist"
                                        Wrap="true" TextMode="MultiLine"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="reqComment" runat="server" ControlToValidate="txtComment"
                                        ErrorMessage="User Name Required" ValidationGroup="comment" Display="Dynamic"><img src="Images/InputError.png" alt="Comment Required" /></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <div class="buttondiv">
                                        <asp:Button ID="btnSubmitComment" runat="server" Text="Submit" CssClass="cssbutton"
                                            Width="75px" ValidationGroup="comment" />
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
